<?php
	include "config.inc.php";
	$sth = mysql_query(
    sprintf(
            "SELECT c_id,p_id,p_title FROM projects WHERE c_id = '%s'",
            mysql_real_escape_string($_GET['id'])
    )
);

	$projects = array();
	while($r = mysql_fetch_array($sth)) {
		$projects[] = array('id' => $r['p_id'], 'name' => $r['p_title']);
	}
	print json_encode($projects);
	exit;


?>